# -*- coding:utf-8 -*-

__author__ = 'dong'



import requests

# 商务


url = 'http://52liezheng.com/publish/step4.ujson'

data = {
    'refId': 0,
    '_loginType': 2,
    'infoType': 2,
    'licType': 1203,
    'shortTitle': '现企业增项资质现需二级水利水电。',
    # 'ps99Desc': '',
    # 'nowPId': province_id,  # 省
    # 'nowPCId': city_id,  # 市
    'nowPC': 3001,
    'reqSalary': 0,
    'presentStatus': 2,
    'title': 0,
    'otherPro': '',
    'profession': '',
    'detailDesc': '，初转不限 有意请联系 1.【建筑】【市政】【公路】【机电】【水利水电】挂证或挂章皆可2.初始转注不限 3.单位安全可靠,持证人与用人单位直接沟通，可随时到单位实地考察，如有意向，请及时来电咨询！',
    'properity': 0,
    'emploeeNum': 0,
    'business': 0,
    'quality': 0,
    'phone': '17727766372',
    'hidePhone': 1, #1隐藏
    'phoneBelongTo': '',
    'chkCode': '',
    'qq': '332899008',
    'password': 'ab654321',
    # 'contactPerson': '李工',
    # 'ipBelongTo': '广东汕尾',
}

headers = {
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'Referer': 'http://52liezheng.com/publish/step3.xhtml?_loginType=2&infoType=2&licType=1203'
}

r = requests.post(url=url, data=data, headers=headers)

print r.content

result = r.json()

if result.get('success'):
    print '发送成功'
else:
    print '失败'
